/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import hiber.Configuration;
import master_server.Element;
import org.hibernate.Hibernate;
import org.hibernate.Session;

/**
 *
 * @author lb
 */
public class configDAO extends AbstractDAO{

    @Override
    protected String _queryList(){
        return "from configuration";
    }
    
    @Override
    protected Element _select(Session session, int num) {
        Configuration config = (Configuration) session.get(Configuration.class, new Long(num));
        if (config != null)
            Hibernate.initialize(config.getHistoriques());
        return config;
    }

}
